using System;
using System.Collections.Generic;
using System.IO;
using System.Diagnostics;

namespace Graph
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            DirectGraph Graph = new DirectGraph();
            DirectGraph Graph1 = new DirectGraph();
            int[] st = new int[] { 0, 3 };
            st = Graph.loadFlowGraph("Graph.flowgraph");
            Graph1.loadFlowGraph("Graph.flowgraph");
            //FlowKnoten s = new FlowKnoten(0);
            //FlowKnoten t = new FlowKnoten(3);
            //FlowKnoten a = new FlowKnoten(1);
            //FlowKnoten b = new FlowKnoten(2);
            //Graph.neuerKnoten(s);
            //Graph.neuerKnoten(t);
            //Graph.neuerKnoten(a);
            //Graph.neuerKnoten(b);

            //FlowKante Kante = new FlowKante(0, 1, 4);
            //Graph.neueKante(Kante, 4);
            //Kante = new FlowKante(1, 2, 3);
            //Graph.neueKante(Kante, 3);
            //Kante = new FlowKante(2, 3, 4);
            //Graph.neueKante(Kante, 4);
            //Kante = new FlowKante(0, 2, 3);
            //Graph.neueKante(Kante, 3);
            //Kante = new FlowKante(1, 3, 2);
            //Graph.neueKante(Kante, 2);

            AlgorithmFlow Flow = new AlgorithmFlow(Graph);
            AlgorithmFlow Flow1 = new AlgorithmFlow(Graph1);

            Stopwatch stop = new Stopwatch();
            stop.Start();
            Console.WriteLine("Flow with GapHeur.: " + Flow.getMaxFlowFIFO(st[0], st[1], true));
            stop.Stop();
            Console.WriteLine("Time: " + stop.ElapsedMilliseconds);

            stop.Reset();
            stop.Start();
            Console.WriteLine("Flow without GapHeur.: " + Flow1.getMaxFlowFIFO(st[0], st[1], false));
            stop.Stop();
            Console.WriteLine("Time :" + stop.ElapsedMilliseconds);
        }


    }
}

